<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:icecore="http://www.icefaces.org/icefaces/core"
                xmlns:ice="http://www.icesoft.com/icefaces/component"
                xmlns:ace="http://www.icefaces.org/icefaces/components"
                template="./templates/templatePaginaPrincipal.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core">

    <ui:define name="content">
        conteudo do template
        <h:form id="formPrinc">
            <icecore:singleSubmit/>
            <ice:dataTable binding="#{beanCadastroDeAcoes.dataTable}" resizable="true"  cellpadding="0" headerClass="icelist-header"  rowClasses="icelist-row-even,icelist-row-odd" clientOnly="true" style="margin-top:-3px; width:100%;"
                           value="#{beanCadastroDeAcoes.rowModelProduto}" var="currentRow" >
                <ice:column>
                    <ice:rowSelector clickedRow="-1" enhancedMultiple="false" immediate="true"  id="outputTextFormCadGerUsuario2rselector" multiple="false" preStyleOnSelection="true"
                                     selectionListener="#{beanCadastroDeAcoes.rowSelector1_processAction}"/>
                    <ice:outputText  value="#{currentRow['descricao']}"/>
                    <f:facet name="header">
                        <ice:outputText value="Nome Ação"/>
                    </f:facet>
                </ice:column>
                <ice:column  >
                    <ice:commandButton  value="Alterar" actionListener="#{beanCadastroDeAcoes.alterar}"/>
                    <f:facet name="header">
                        <ice:outputText value="Alterar"/>
                    </f:facet>
                </ice:column>
                <ice:column  >
                    <ice:commandButton  value="excluir" actionListener="#{beanCadastroDeAcoes.excluir}"/>
                    <f:facet name="header">
                        <ice:outputText value="Excluír"/>
                    </f:facet>
                </ice:column>

            </ice:dataTable>
            <ice:panelGrid columns="3">
                <ice:outputText value="Nome Ação"/>
                <ice:inputText id="nomeAcao" value="#{beanCadastroDeAcoes.acaoSelecionada.descricao}"/>
                <ice:message for="nomeAcao"/>
            </ice:panelGrid>
            <ice:panelGrid columns="3">
                <ice:commandButton value="INSERIR" actionListener="#{beanCadastroDeAcoes.inserir}"/>
                <ice:commandButton value="SALVAR" actionListener="#{beanCadastroDeAcoes.salvar}"/>
            </ice:panelGrid>
        </h:form>
    </ui:define>

</ui:composition>
